﻿#pragma once


#include "MaterialGraph/Node/MaterialGraphNodeViewModel.h"
#include "MaterialFloatNodeViewModel.m.h"

class RMaterialGraphNodeModel;
class RMaterialFloatNodeModel;
class RMaterialGraphPinViewModel;

RCLASS()
class RMaterialFloatNodeViewModel : public RMaterialGraphNodeViewModel
{
    ROBJECT
    
public:
    virtual void BindModel(
        TSharedObjectPtr<RMaterialGraphNodeModel> InModel
        , TSharedObjectPtr<RMaterialGraphViewModel> InGraph
        )  override;

    virtual float GetNodeWidth() const  override{ return 200.0f; }
    virtual int64_t GetLineNum() const override;
    virtual CString GetName() const override { return U"数字"; };
    virtual bool PotentiallyIsOrIsParameter() const { return true; }
    virtual bool IsParameter() const ;
    virtual void ToggleParameter() ;
    virtual CString GetParameterName() const;
    virtual void SetParameterName(const CString & InName) ;

    float GetValue() const;
    void SetValue(float InValue);


protected:
    TWeakObjectPtr<RMaterialFloatNodeModel> FloatModel;

};